$(function(){
	goToPage(1);
});
function goToPage(pageNo){
	var deviceName = $('#deviceName').val();
	$.ajax({
		url : contextPath + 'user/zyzsfssb/list',
		data : {
			towerCode : zygtid,
			deviceName : deviceName,
			pageNo : pageNo,
			pageSize : 10
		},
		type : 'POST',
		success : function(list) {
			$(".pwsj_right_byq_divbox").empty();
			$(".page").empty();
			//alert(list.totalRecord);
			if(list!=null && list.totalRecord>0){
				var obj = list.records;
				for(var i=0;i<obj.length;i++){
					var div= '<ul class="byq_cont_ul">';
					div += '<li id="deviceBox" name="deviceBox" class="" style="width:4%;"><input type="checkbox" value="'+obj[i].deviceid+'" class="checkbox" /></li>';
					div += '<li style="width:15%;"><a href="zyzsfssbinfo.jsp?deviceid='+obj[i].deviceid+'">'+(obj[i].devicename==null?"":obj[i].devicename)+'</a></li>';
					div += '<li style="width:15%;">'+(obj[i].linecode==null?"":obj[i].linecode)+'</li>';
					div += '<li style="width:10%;">'+(obj[i].towercode==null?"":obj[i].towercode)+'</li>';
					div += '<li style="width:10%;">'+(obj[i].devicetype==null?"":obj[i].devicetype)+'</li>';
					div += '<li style="width:10%;">'+(obj[i].deviceclasses==null?"":obj[i].deviceclasses)+'</li>';
					div += '<li style="width:10%;">'+(obj[i].model==null?"":obj[i].model)+'</li>';
					div += '<li style="width:10%;">'+(obj[i].productionfactory==null?"":obj[i].productionfactory)+'</li>';
					div += '<li class="operate" style="width:15%; border-right:none;">';
					//权限判断
					/*if(true){
						div +=	'<a  class="detail_a">编辑</a>';
					}*/
					
					
					if(mediumeditaction){
						div += '<a href="'+contextPath+'user/z/zyzsfssbedite.jsp?deviceid='+obj[i].deviceid+'" class="detail_a_edite">编辑</a>';
					}
					if(mediumdeleteaction){
						div += '<a  onclick="devicedel(\'zyzsfssb\',\''+obj[i].deviceid+'\',0,0)" class="detail_a_del">删除</a>';
					}
					div +=	'</li>';
					div += '</ul>';
					$(".pwsj_right_byq_divbox").append(div);
				}
				pageList(list);
			}
		}
	});
}